<%@ page language="java" contentType="text/html; charset=UTF-8"
	pageEncoding="UTF-8"%>
	<jsp:include page="style.jsp"></jsp:include>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<%	String basePath = request.getContextPath();%>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>慧装网后台管理系统</title>
</head>
<body>
<div align="center" style="margin-top: 90px">
	<div class="easyui-panel" title="慧装网后台登录" style="width: 350px">
		<div style="padding: 10px 60px 20px 60px">
				<table cellpadding="5">
					<tr>
						<td>帐号:</td>
						<td><input class="easyui-textbox" type="text" name="name" id="name"
							data-options="required:true"></input></td>
					</tr>
					<tr>
						<td>密码:</td>
						<td><input class="easyui-textbox" type="text" name="password" id="password"
							data-options="required:true"></input></td>
					</tr>
				</table>
			<div style="text-align: center; padding: 5px">
				<a href="javascript:void(0)" class="easyui-linkbutton"
					onclick="login()"iconCls="icon-man">登录</a> <a href="javascript:void(0)"
					class="easyui-linkbutton"iconCls="icon-undo" onclick="clearForm()">取消</a>
			</div>
		</div>
	</div>
</div>
</body>
<script type="text/javascript">
	function login(){
		var params = "name="+$("#name").val()+"&password="+$("#password").val();
		var url = "<%=basePath%>/mgrsystem/login.do?"+params;
		$.post(url,params,function(data,status){
			data = eval('(' + data + ')');
			if(status=="success"&&data.status==200){
				window.location.href = "<%=basePath%>/view/home.jsp";
			}else{
				alert("登录错误:"+data.content);
			}
		});
	}
	function clearForm(){
		window.location = "<%=basePath%>/index.jsp";
	}
</script>
</html>